#include "Timer.h"

Timer::Timer(){
	;
}
Timer::~Timer(){
	;
}
void Timer::Start(){
	gettimeofday(&tv, NULL);
}
unsigned long Timer::Get(){
	struct timeval tv2;
	gettimeofday(&tv2, NULL);
	return (tv2.tv_sec-tv.tv_sec)*1000000+(tv2.tv_usec-tv.tv_usec);
}
void Timer::Print(){
	cout<<"-t- "<<Get()<<endl;
}
void Timer::Print(string s){
	cout<<"-t- "<<Get()<<" "<<s<<endl;
}
